﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using JLPT.Models.Objects;


namespace JLPT.Models
{
    public class InitData : DropCreateDatabaseIfModelChanges<JLPTContext>
    {

        protected override void Seed(JLPTContext context)
        {

            context.Masters.Add(new Master { Id = 1, Name = "N1", Code = "C001" });
            context.Masters.Add(new Master { Id = 2, Name = "N2", Code = "C001" });
            context.Masters.Add(new Master { Id = 3, Name = "N3", Code = "C001" });
            context.Masters.Add(new Master { Id = 4, Name = "N4", Code = "C001" });
            context.Masters.Add(new Master { Id = 5, Name = "N5", Code = "C001" });
            context.Masters.Add(new Master { Id = 6, Name = "Kanji", Code = "C002" });
            context.Masters.Add(new Master { Id = 7, Name = "Kotoba", Code = "C002" });
            context.Masters.Add(new Master { Id = 8, Name = "Grammar", Code = "C002" });

            context.Questions.Add(new Question { Id = 1, Name = "ご協力ありがとうございます。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 2, Name = "ほかの人の論文から意見を引用した。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 3, Name = "合格の知らせによろこんだ。。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 4, Name = "代金は銀行から振り込みます。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 5, Name = "田中と申します。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 6, Name = "中級レベルの日本語の本をさがします。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 7, Name = "米国に留学する。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 8, Name = "携帯電話は便利です。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 9, Name = "品物が入荷したら、お知らせします。", TypeId = 6, LevelId = 3 });
            context.Questions.Add(new Question { Id = 10, Name = "白い砂の上を歩きます。", TypeId = 6, LevelId = 3 });

            context.QuestionSubs.Add(new QuestionSub { Id = 1, Name = "協力", QuestionId = 1 });
            context.QuestionSubs.Add(new QuestionSub { Id = 2, Name = "論文", QuestionId = 2 });
            context.QuestionSubs.Add(new QuestionSub { Id = 3, Name = "引用", QuestionId = 2 });
            context.QuestionSubs.Add(new QuestionSub { Id = 4, Name = "合格", QuestionId = 3 });
            context.QuestionSubs.Add(new QuestionSub { Id = 5, Name = "振り込みます", QuestionId = 4 });
            context.QuestionSubs.Add(new QuestionSub { Id = 6, Name = "申します", QuestionId = 5 });
            context.QuestionSubs.Add(new QuestionSub { Id = 7, Name = "中級", QuestionId = 6 });
            context.QuestionSubs.Add(new QuestionSub { Id = 8, Name = "米国", QuestionId = 7 });
            context.QuestionSubs.Add(new QuestionSub { Id = 9, Name = "便利", QuestionId = 8 });
            context.QuestionSubs.Add(new QuestionSub { Id = 10, Name = "入荷", QuestionId = 9 });
            context.QuestionSubs.Add(new QuestionSub { Id = 11, Name = "砂", QuestionId = 10 });

            context.QuestionDetails.Add(new QuestionDetail { Id = 1, Answer = "きゅうりょく", IsRight = false, QuestionSubId = 1 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 2, Answer = "きょうりょく", IsRight = true, QuestionSubId = 1 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 3, Answer = "こうりょく", IsRight = false, QuestionSubId = 1 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 4, Answer = "こうりゃく", IsRight = false, QuestionSubId = 1 });

            
            context.QuestionDetails.Add(new QuestionDetail { Id = 5, Answer = "ろんぶん", IsRight = true, QuestionSubId = 2 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 6, Answer = "りんぶん", IsRight = false, QuestionSubId = 2 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 7, Answer = "ろんもん", IsRight = false, QuestionSubId = 2 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 8, Answer = "りんもん", IsRight = false, QuestionSubId = 2 });

            
            context.QuestionDetails.Add(new QuestionDetail { Id = 9, Answer = "きよう", IsRight = false, QuestionSubId = 3 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 10, Answer = "りよう", IsRight = false, QuestionSubId = 3 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 11, Answer = "しよう", IsRight = false, QuestionSubId = 3 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 12, Answer = "いんよう", IsRight = true, QuestionSubId = 3 });

            context.QuestionDetails.Add(new QuestionDetail { Id = 13, Answer = "ごかく", IsRight = false, QuestionSubId = 4 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 14, Answer = "あいきゃく", IsRight = false, QuestionSubId = 4 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 15, Answer = "ごうかく", IsRight = true, QuestionSubId = 4 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 16, Answer = "こうかく", IsRight = false, QuestionSubId = 4 });

            context.QuestionDetails.Add(new QuestionDetail { Id = 17, Answer = "はりこみ", IsRight = false, QuestionSubId = 5 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 18, Answer = "ありこみ", IsRight = false, QuestionSubId = 5 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 19, Answer = "ふりこみ", IsRight = true, QuestionSubId = 5 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 20, Answer = "ほりこみ", IsRight = false, QuestionSubId = 5 });

            context.QuestionDetails.Add(new QuestionDetail { Id = 21, Answer = "もよおします", IsRight = false, QuestionSubId = 6 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 22, Answer = "もおします", IsRight = false, QuestionSubId = 6 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 23, Answer = "まうします", IsRight = false, QuestionSubId = 6 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 24, Answer = "もうします", IsRight = true, QuestionSubId = 6 });
            //
            context.QuestionDetails.Add(new QuestionDetail { Id = 25, Answer = "ちゅうきゅう", IsRight = true, QuestionSubId = 7 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 26, Answer = "ちょうきゅう", IsRight = false, QuestionSubId = 7 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 27, Answer = "じょうきゅう", IsRight = false, QuestionSubId = 7 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 28, Answer = "しょうきゅう", IsRight = false, QuestionSubId = 7 });

            context.QuestionDetails.Add(new QuestionDetail { Id = 29, Answer = "まいこく", IsRight = false, QuestionSubId = 8 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 30, Answer = "めいこく", IsRight = false, QuestionSubId = 8 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 31, Answer = "べいこく", IsRight = true, QuestionSubId = 8 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 32, Answer = "みいこく", IsRight = false, QuestionSubId = 8 });

            context.QuestionDetails.Add(new QuestionDetail { Id = 33, Answer = "びんり", IsRight = false, QuestionSubId = 9 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 34, Answer = "べんり", IsRight = true, QuestionSubId = 9 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 35, Answer = "ばんり", IsRight = false, QuestionSubId = 9 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 36, Answer = "べんに", IsRight = false, QuestionSubId = 9 });

            context.QuestionDetails.Add(new QuestionDetail { Id = 37, Answer = "にゅうこ", IsRight = false, QuestionSubId = 10 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 38, Answer = "にゅうに", IsRight = false, QuestionSubId = 10 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 39, Answer = "にゅうご", IsRight = false, QuestionSubId = 10 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 40, Answer = "にゅうか", IsRight = true, QuestionSubId = 10 });

            context.QuestionDetails.Add(new QuestionDetail { Id = 41, Answer = "しお", IsRight = false, QuestionSubId = 11 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 42, Answer = "いし  ", IsRight = false, QuestionSubId = 11 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 43, Answer = "たね", IsRight = false, QuestionSubId = 11 });
            context.QuestionDetails.Add(new QuestionDetail { Id = 44, Answer = "すな", IsRight = true, QuestionSubId = 11 });
        }

    }
}